package com.mxbbx.wdn.dao;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.mxbbx.wdn.domain.medical.*;

import java.util.List;
/**
 * 基础数据查询DAO类
 * @author 
 *
 */
public class DataDao extends GenericDao<Data> {

	@Override
	protected Data handle(ResultSet rs) throws SQLException {
		Data entity=new Data();
		entity.setId(rs.getInt("id"));
		entity.setDataCode(rs.getString("dataCode"));
		entity.setDataName(rs.getString("dataName"));
		entity.setType(rs.getString("type"));
		return entity;
	}
	
	public List<Data> findListByType(String type)throws Exception{
	
		String sql="select * from data where type=?";
		Object[]params={type};
		return super.queryOjects(sql, params);
	}

}

